SUBDIRS = test1-static test2-dynamic test3-twomodules test4-interdep test5-execsymbols test6-ltdlopen test7-win32dll test8-execlass test9-modclass test10-modvirtual test11-modglobalconstr test12-modglobalconstr2

all: build_libltdl
	-for i in $(SUBDIRS); do (echo Entering $$i; cd $$i && make all; echo Leaving $$i;); done

build_libltdl:
	cd libltdl; make all

test: all
	sh ./testscript

clean:
	for i in $(SUBDIRS); do (echo Entering $$i; cd $$i && make clean; echo Leaving $$i;); done

dist-clean: clean
	cd libltdl; make distclean
	rm -rf Makefile */Makefile config.h config.log config.status config.cache libtool testscript
